package com.lzh.xianguang.common;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Question ErrorAdice
 * @Date 2023/3/5 21:18
 * @Solution
 */
@ControllerAdvice
@ResponseBody
public class ErrorAdice {
    @ExceptionHandler(Exception.class)
    public Object exceptionAdvice(Exception e) {
        return AjaxResult.fail(-1,"sda");
    }
}
